package co.yixiang.yshop.module.order.controller.app.feedback.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户 App - 反馈分析结果 Response VO
 */
@Schema(description = "用户 App - 反馈分析结果 Response VO")
@Data
public class FeedbackAnalysisRespVO {

    @Schema(description = "反馈ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12345")
    private String feedbackId;

    @Schema(description = "订单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
    private String orderId;

    @Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31")
    private String productId;

    @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "拿铁")
    private String productName;

    @Schema(description = "用户反馈内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "太甜了，建议减糖")
    private String userFeedback;

    @Schema(description = "AI分析状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "COMPLETED")
    private String analysisStatus;

    @Schema(description = "个性化提示", example = "甜度已调低")
    private String personalizedTip;

    @Schema(description = "调整后的配比", example = "温度:少冰,热;甜度:少少糖,多糖,默认")
    private String adjustedRecipe;

    @Schema(description = "配比变更详情")
    private List<RecipeChangeDetail> recipeChanges;

    @Schema(description = "AI建议说明", example = "根据您的反馈，我们为拿铁添加了少少糖选项，让您有更多甜度选择")
    private String aiSuggestion;

    @Schema(description = "分析完成时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime analysisTime;

    @Schema(description = "是否为复购用户", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean isRepeatPurchase;

    /**
     * 配比变更详情
     */
    @Data
    @Schema(description = "配比变更详情")
    public static class RecipeChangeDetail {

        @Schema(description = "配比类别", example = "甜度")
        private String category;

        @Schema(description = "变更类型", example = "ADD")
        private String changeType;

        @Schema(description = "原始配比", example = "少糖,多糖,默认")
        private String originalRecipe;

        @Schema(description = "调整后配比", example = "少少糖,少糖,多糖,默认")
        private String adjustedRecipe;

        @Schema(description = "变更说明", example = "新增少少糖选项")
        private String description;
    }
}